<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 		<%@ include file="/WEB-INF/page/public/taglib.jsp"%>

 
<!DOCTYPE html>
<html>
  <head>
  	 <title>crm系统登录</title>
	 <%@ include file="/WEB-INF/page/mobile/public/meta.jsp"%>
  </head>
  <body> 
    <!-- Views-->
    <div class="views viewsed " id="loginapp" >
      <div class="view view-main"  data-page="login">
       <form action="/mlogin" id="loginform" method="post"  > 
      		<div class="view-logo">
      			<div class="view-logoimg">
      				<img src="/images/mobile/logo.png">
      			</div>	
      		</div>
      		<!--输入框-->
      		<ul class="input-news">
      	  
      		<!-- <li :class="{ 'control': true }"><input v-validate="'required|email'" :class="{'input': true, 'is-danger': errors.has('email') }" name="email" type="text" placeholder="Email">
        <span v-show="errors.has('email')" class="help is-danger">{{ errors.first('email') }}</span></li>   -->
      		
      		  <li :class="{ 'control': true }">
      				<p class="input-icon"></p><input value="admin" name="account" type="text" placeholder="账号">
     <!--    <span v-show="errors.has('account')" class="help is-danger">{{ errors.first('account') }}</span> -->
      				 
      			</li> 
      			<li><p class="input-iconone"></p><input type="password"  name="password" value="123456" placeholder="密码"/></li>
      			<li class="input-list-one"><p class="input-icontwo"></p><input type="text" name="codenum" placeholder="请输入验证码"  value=""  /><p class="input-img"><img src="code.jpg"   @click="checkcode" style="cursor:pointer;" id="changeimg"></p></li>
      		</ul>
      		<!--登录-->
      		<div class="input-login"><a href="#"  @click="submit">登录</a></div>
         </form>
      </div>
    </div>

   <%@ include file="/WEB-INF/page/mobile/public/foot.jsp"%>
   <script type="text/javascript">
   var $$ = Dom7;
   
   veeconfig = {
		   errorBagName: 'errors', // change if property conflicts.
		   fieldsBagName: 'fields', 
		   delay: 0, 
		   locale: 'zh_CN',  
		   dictionary: null, 
		   strict: true, 
		   enableAutoClasses: false, 
		   classNames: {
		     touched: 'touched', // the control has been blurred
		     untouched: 'untouched', // the control hasn't been blurred
		     valid: 'valid', // model is valid
		     invalid: 'invalid', // model is invalid
		     pristine: 'pristine', // control has not been interacted with
		     dirty: 'dirty' // control has been interacted with
		   },
		   events: 'input|blur',
		   inject: true
		 };
    
   Vue.use(VeeValidate, veeconfig);
   
   var vm = new Vue({
		el:'#loginapp',
	    data:{el:{igcode:'#changeimg'}},
		methods: {
			checkcode: function () {
				 
            	var imgSrc = $$(vm.el.igcode);
		        var src = imgSrc.attr("src");
		        var timestamp = (new Date()).valueOf();
		        imgSrc.attr("src", "code.jpg?dt="+timestamp);  
			},
			submit:function(){
				
				 $$("#loginform").submit();
			 
			},
			validateBeforeSubmit:function() {
			   
			 }
		}
	});
   </script>
  </body>
</html>